<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateVNoticeTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('v_notice', function (Blueprint $table) {
            $table->increments('id');
            $table->uuid('send_uuid')->comment('发送者唯一标识');
            $table->string('title',128)->default('')->comment('通告标题');
            $table->longText('content')->comment('通告内容');
            $table->timestamps();
            $table->index('send_uuid', 'idx_send_uuid');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('v_notice');
    }
}
